import { getAllChannels } from '@/api'

export const homeModule = {
  namespaced: true,
  state: {
    allChannel: []
  },
  mutations: {
    setAllChannelMutations (state, val) {
      state.allChannel = val
    }
  },
  actions: {
    async setAllChannelActions (store) {
      const res = await getAllChannels()
      store.commit('setAllChannelMutations', res.data.data.channels)
    }
  }
}
